/**
 * File  : Socket.h
 * Time  : 2015-01-05 10:36
 * Author: KashingLee
 * Ref   : Null
 */
#ifndef PLCC_NET_SOCKET_H_
#define PLCC_NET_SOCKET_H_

#include <unistd.h>
#include <sys/socket.h>

class Socket {
 public:
  Socket();
  Socket(int family, int type);//family,type
  ~Socket();

 public:
  void set_type(int type)     {type_ = type;}
  void set_family(int family) {family_ = family;}

  int  Getfd(); //return socket()
  int  ShutDown(int how);
  int  Close();

 private:
  int  sockfd_;//init to -1
  int  type_;
  int  family_;
};
#endif // PLCC_NET_SOCKET_H_
